Make gdk-pixbuf-csource work on Windows also in the build tree.
authorSam Thursfield <ssssam@gmail.com>
Sun, 2 Aug 2009 07:40:13 +0000 (10:40 +0300)
committerTor Lillqvist <tml@iki.fi>
Sun, 2 Aug 2009 07:40:13 +0000 (10:40 +0300)
Patch from bug #590448.

gdk-pixbuf/gdk-pixbuf-io.c

index bc357bd0592d9e6092e6c0f82432663518dd5198..664e519da2dda4690349730b347ec98f96dffd8a 100644 (file)
@@ -277,6 +277,12 @@ correct_prefix (gchar **path)
   if (strncmp (*path, GTK_PREFIX "/", strlen (GTK_PREFIX "/")) == 0 ||
       strncmp (*path, GTK_PREFIX "\\", strlen (GTK_PREFIX "\\")) == 0)
     {
+      if (strlen(*path) > 5 && strncmp (*path - 5, ".libs", 5) == 0)
+        {
+          /* We are being run from inside the build tree, and shouldn't mess about. */
+          return;
+       }
+
       /* This is an entry put there by gdk-pixbuf-query-loaders on the
        * packager's system. On Windows a prebuilt GTK+ package can be
        * installed in a random location. The gdk-pixbuf.loaders file